<?php

namespace App\Http\Requests;

use Illuminate\Foundation\Http\FormRequest;

class UpdateActivityRequest extends FormRequest
{
    /**
     * Determine if the user is authorized to make this request.
     *
     * @return bool
     */
    public function authorize()
    {
        return true;
    }

    /**
     * Get the validation rules that apply to the request.
     *
     * @return array
     */
    public function rules()
    {

        $validation = array();

        if ($this->activity_nameHide == $this->activity_name) {
            $validation['activity_name']='required';
        } else {
            $validation['activity_name']='required|unique:activity,activity_name';
        }

        return $validation;

    }
}
